<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('roleMail')}">游戏邮件列表</a></li>
    </ul>
    <form class="search_form" method="get" action="{:url('roleMail')}">
        <div class="well form-inline margin-top-20">
            收件人ID：
            <input type="text" class="form-control selector" name="role_id" style="width:150px;"
                   value="{:input('request.role_id','')}" data-action="selectNode"
                   data-url="{:url('/admin/Ajax/getPlayerInfo')}" placeholder="输入玩家ID或角色名查询">
            附件ID：
            <input type="text" class="form-control selector" name="item_code" style="width:150px;"
                   value="{:input('request.item_code','')}" data-action="selectNode"
                   data-url="{:url('/admin/Ajax/getItem')}" placeholder="输入物品ID查询">
            时间：
            <input id="sDay" class="form-control js-date" style="width: 105px;" type="text"
                   value="{:input('sDay',date('Y-m-d'))}" name="sDay">
            ~
            <input id="eDay" class="form-control js-date" style="width: 105px;" type="text"
                   value="{:input('eDay',date('Y-m-d'))}" name="eDay">
            <input type="submit" class="btn btn-primary" value="搜索"/>
        </div>
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th style="text-align: center; width:5%">ID</th>
                <th style="text-align: center; width:8%">发件人</th>
                <th style="text-align: center; width :8%">收件人</th>
                <th style="text-align: center; width: 20%;">邮件标题</th>
                <th style="width: 10%;">类型</th>
                <th style="text-align: center;">邮件内容</th>
                <th style="text-align: center; width: 12%;">附件</th>
                <th style="text-align: center; width: 5%;">阅读</th>
                <th style="text-align: center; width: 5%;">领取</th>
                <th style="text-align: center; width: 8%;">时间</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="data" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>
                        <eq name="vo.send_role_id" value="0">系统
                            <else/>
                            {$vo.from_name} [{$vo.send_role_id}]
                        </eq>
                    </td>
                    <td><a href="{:url('PlayerManage/playerInfo',array('role_id' => $vo['rec_role_id']))}"
                           target="_blank">{$vo.to_name}</a></td>
                    <td class="word">{$vo.mail_title}</td>
                    <td>
                        <if condition="$vo['mail_kind'] == 1">
                            <br>邮件<br/>
                            <elseif condition="$vo['mail_kind'] == 2"/>
                            <br>公告<br/>
                        </if>
                    </td>
                    <td class="word">{$vo.mail_content}</td>
                    <td>
                        <php>
                            $consumeArr = string2array($vo["attach"]);
                            foreach ($consumeArr as $key => $v){
                            echo ($itemConf[$v[0]] ?? $v[0])." * ".$v[1]."<br/>";
                            }
                        </php>
                    </td>
                    <td style="text-align: center;">
                        <eq name="vo.award" value="1">是
                            <else/>
                            否
                        </eq>
                    </td>
                    <td>{$vo.ctime|date="Y-m-d H:i:s"}</td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<include file="public@footer"/>